package util;

import java.util.ArrayList;

import org.eclipse.jdt.internal.compiler.parser.diagnose.RangeUtil;

import entity.User;

public class sessionUtil
{
	public static Object getUserBySeesionID(ArrayList<User> userList,String sessionID)
	{
		if (userList == null)
		{
			return null;
		}
		
		for(int i = 0 ; i < userList.size(); i++)
		{
			User user = userList.get(i);
			if(user.getSessionID().equals(sessionID))
			{
				return user;
			}
		}
		
		// TODO Auto-generated method stub
		return null;
	}
}
